package com.concurrency.example.singleton;

import org.junit.Test;

public class SingletonTest {
    @Test
    public void fun1(){
        System.out.println("先执行打印");

        SingletonExample6 instance = SingletonExample6.getInstance();
    }

    @Test
    public void fun7(){
        System.out.println("先执行打印");

        SingletonExample7 instance = SingletonExample7.getInstance();
    }

    //懒汉式，通过静态内部类创建
    @Test
    public void fun8(){
        System.out.println("先执行打印");

        SingletonExample8 singletonExample8 = SingletonExample8.fetchSingletonExample8();
    }
}
